{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a86fd346",
   "metadata": {},
   "outputs": [],
   "source": [
    "import plotly.graph_objects as go\n",
    "\n",
    "results = [\n",
    "    (\"Constant\", \"gray\", 106.18),\n",
    "    (\"Linear Regression\", \"gray\", 101.56),\n",
    "    (\"NLP + LR\", \"gray\", 76.81),\n",
    "    (\"Random Forest\", \"gray\", 72.28),\n",
    "    (\"XGBoost\", \"gray\", 68.23),\n",
    "    (\"Human (Ed)\", \"black\", 87.62),\n",
    "    (\"Neural Network\", \"orange\", 63.97),\n",
    "    (\"GPT 4.1 Nano\", \"slateblue\", 62.51),\n",
    "    (\"Grok 4.1 Fast\", \"slateblue\", 57.62),\n",
    "    (\"Gemini 3 Pro\", \"slateblue\", 50.54),\n",
    "    (\"Claude 4.5 Sonnet\", \"slateblue\", 47.10),\n",
    "    (\"GPT 5.1\", \"slateblue\", 44.74),\n",
    "    (\"GPT 4.1 Nano (Fine-tuned)\", \"skyblue\", 75.91),\n",
    "    (\"Deep Neural Network\", \"orange\", 46.49)\n",
    "]\n",
    "\n",
    "labels, colors, values = zip(*results)\n",
    "\n",
    "fig = go.Figure(go.Bar(x=labels, y=values, marker_color=colors))\n",
    "\n",
    "fig.update_layout(\n",
    "    title=\"Prediction error from each model\",\n",
    "    yaxis=dict(range=[0, max(values)], title=\"Error\"),\n",
    "    xaxis=dict(tickangle=-45),\n",
    "    width=1000,\n",
    "    height=800\n",
    ")\n",
    "\n",
    "fig.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bfac7653",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "de22d815",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
